home *** CD-ROM | disk | FTP | other *** search
/ Champak 86 / (Vol 86) My Disc.iso / Games / restaurante_1072.swf / scripts / __Packages / PathFinding.as < prev    next >
Text File  |  2009-04-16  |  4KB  |  93 lines

  1. if(true)
  2. {
  3.    if(true)
  4.    {
  5.       ┬º┬ºpush(false);
  6.    }
  7.    if(!┬º┬ºpop())
  8.    {
  9.       if(true)
  10.       {
  11.          if(true)
  12.          {
  13.             ┬º┬ºpush(false);
  14.          }
  15.          if(!┬º┬ºpop())
  16.          {
  17.             if(!_global.PathFinding)
  18.             {
  19.                var _loc2_ = _global.PathFinding = function()
  20.                {
  21.                }.prototype;
  22.                _global.PathFinding = function()
  23.                {
  24.                }.getPathToTable = function(t2)
  25.                {
  26.                   return PathFinding.getPathBetweenTables(Table.getTableByIJ(0,0),t2);
  27.                };
  28.                _global.PathFinding = function()
  29.                {
  30.                }.getPathFromTable = function(t1)
  31.                {
  32.                   var _loc1_ = [];
  33.                   var _loc2_ = Table.getTableByIJ(0,0);
  34.                   _loc1_ = PathFinding.getPathBetweenTables(t1,_loc2_);
  35.                   var _loc4_ = !(t1.__get__RowNum().i != _loc2_.__get__RowNum().i && t1.__get__RowNum().j != _loc2_.__get__RowNum().j) ? _loc2_ : (t1.__get__rendezvousPoint().x >= _loc2_.__get__rendezvousPoint().x ? Table.getTableByIJ(_loc2_.__get__RowNum().i,t1.__get__RowNum().j) : Table.getTableByIJ(t1.__get__RowNum().i,_loc2_.__get__RowNum().j));
  36.                   if(_loc4_ == t1)
  37.                   {
  38.                      _loc1_.pop();
  39.                      _loc1_.push(_loc4_.__get__rendezvousPoint());
  40.                   }
  41.                   else if(_loc4_ == _loc2_)
  42.                   {
  43.                      _loc1_.pop();
  44.                      _loc1_.push(_loc4_.__get__rendezvousPoint());
  45.                   }
  46.                   else
  47.                   {
  48.                      _loc1_.pop();
  49.                      _loc1_.pop();
  50.                      _loc1_.push(_loc2_.__get__rendezvousPoint());
  51.                   }
  52.                   return _loc1_;
  53.                };
  54.                _global.PathFinding = function()
  55.                {
  56.                }.getPathBetweenTables = function(t1, t2)
  57.                {
  58.                   if(PathFinding.isSameTable(t1,t2))
  59.                   {
  60.                      return [t1.__get__rightPoint(),t1.__get__arrivePoint()];
  61.                   }
  62.                   var _loc4_ = [];
  63.                   var _loc2_ = !(t1.__get__RowNum().i != t2.__get__RowNum().i && t1.__get__RowNum().j != t2.__get__RowNum().j) ? t2 : (t1.__get__rendezvousPoint().x >= t2.__get__rendezvousPoint().x ? Table.getTableByIJ(t2.__get__RowNum().i,t1.__get__RowNum().j) : Table.getTableByIJ(t1.__get__RowNum().i,t2.__get__RowNum().j));
  64.                   _loc4_.push((t1.__get__arrivePoint().x - _loc2_.__get__arrivePoint().x) * (t1.__get__arrivePoint().y - _loc2_.__get__arrivePoint().y) <= 0 ? t1.__get__leftPoint() : t1.__get__rightPoint());
  65.                   if(t2 == _loc2_)
  66.                   {
  67.                      _loc4_.push((t1.__get__arrivePoint().x - _loc2_.__get__arrivePoint().x) * (t1.__get__arrivePoint().y - _loc2_.__get__arrivePoint().y) <= 0 ? _loc2_.__get__leftPoint() : _loc2_.__get__rightPoint());
  68.                      _loc4_.push(_loc2_.__get__arrivePoint());
  69.                   }
  70.                   else
  71.                   {
  72.                      _loc4_.push(_loc2_.__get__rendezvousPoint());
  73.                      _loc4_.push((t2.__get__arrivePoint().x - _loc2_.__get__arrivePoint().x) * (t2.__get__arrivePoint().y - _loc2_.__get__arrivePoint().y) <= 0 ? t2.__get__leftPoint() : t2.__get__rightPoint());
  74.                      _loc4_.push(t2.__get__arrivePoint());
  75.                   }
  76.                   return _loc4_;
  77.                };
  78.                _global.PathFinding = function()
  79.                {
  80.                }.isSameTable = function(t1, t2)
  81.                {
  82.                   return t1.__get__rendezvousPoint().x == t2.__get__rendezvousPoint().x && t1.__get__rendezvousPoint().y == t2.__get__rendezvousPoint().y;
  83.                };
  84.                ┬º┬ºpush(ASSetPropFlags(_global.PathFinding.prototype,null,1));
  85.             }
  86.             ┬º┬ºpop();
  87.          }
  88.       }
  89.       ┬º┬ºgoto(addr425);
  90.    }
  91. }
  92. addr425:
  93.